<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%solution_creative_map}}".
 *
 * @property integer $id
 * @property integer $solution_id
 * @property string $solution_name
 * @property integer $creative_id
 * @property string $creative_name
 * @property integer $ad_network_id
 * @property integer $advertiser_id
 * @property integer $status
 * @property string $last_update
 */
class SolutionCreativeMap extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%solution_creative_map}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['solution_id', 'creative_id'], 'required'],
            [['solution_id', 'creative_id', 'ad_network_id', 'advertiser_id', 'status'], 'integer'],
            [['last_update'], 'safe'],
            [['solution_name', 'creative_name'], 'string', 'max' => 128],
            [['solution_id', 'creative_id'], 'unique', 'targetAttribute' => ['solution_id', 'creative_id'], 'message' => 'The combination of Solution ID and Creative ID has already been taken.']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'solution_id' => 'Solution ID',
            'solution_name' => 'Solution Name',
            'creative_id' => 'Creative ID',
            'creative_name' => 'Creative Name',
            'ad_network_id' => 'Ad Network ID',
            'advertiser_id' => 'Advertiser ID',
            'status' => 'Status',
            'last_update' => 'Last Update',
        ];
    }
}
